home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Musik / Misc / Amster / Source / include / napster.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-27  |  2.1 KB  |  90 lines

  1. /*
  2. ** Napser Protocol Header
  3. */
  4.  
  5. #include <sys/types.h>
  6.  
  7. #ifndef AMSTER_NAPSTER_H
  8. #define AMSTER_NAPSTER_H
  9.  
  10. extern u_long nap_sigmask;
  11. extern char *nap_buf;
  12. extern char *nap_linktype[];
  13.  
  14. typedef struct song_struct {
  15.     char *title;
  16.     char *md5;
  17.     u_long size;
  18.     int bit, freq, time;
  19.     char *user;
  20.     u_long ip;
  21.     int link;
  22. } *song, _song;
  23.  
  24. #define NAPC_LOGINERROR 0
  25. #define NAPC_LOGIN 2
  26. #define NAPC_LOGINRESP 3
  27. #define NAPC_LOGINALT 6
  28. #define NAPC_CREATEUSER 7
  29. #define NAPC_REGSUCCESS 8
  30. #define NAPC_REGUSED 9
  31. #define NAPC_NICKINVALID 10
  32. #define NAPC_NOTIFYSHARE 100
  33. #define NAPC_REMOVESHARE 102
  34. #define NAPC_SEARCH 200
  35. #define NAPC_SEARCHRESULT 201
  36. #define NAPC_SEARCHCOMPLETE 202
  37. #define NAPC_FILEINFOREQ 203
  38. #define NAPC_FILEINFO 204
  39. #define NAPC_PRIVATEMSG 205
  40. #define NAPC_GETERROR 206
  41. #define NAPC_BROWSEUSER 211
  42. #define NAPC_BROWSERESULT 212
  43. #define NAPC_BROWSECOMPLETE 213
  44. #define NAPC_FILECOUNT 214
  45. #define NAPC_DLINC 218
  46. #define NAPC_DLCOMPLETE 219
  47. #define NAPC_ULINC 220
  48. #define NAPC_ULCOMPLETE 221
  49. #define NAPC_CHANNELJOIN 400
  50. #define NAPC_CHANNELPART 401
  51. #define NAPC_PUBLICMSGSEND 402
  52. #define NAPC_PUBLICMSGRECV 403
  53. #define NAPC_GENERALERROR 404
  54. #define NAPC_JOINACK 405
  55. #define NAPC_JOINMSG 406
  56. #define NAPC_USERPART 407
  57. #define NAPC_USERLIST 408
  58. #define NAPC_USERLISTEND 409
  59. #define NAPC_CHANNELTOPIC 410
  60. #define NAPC_ALTDLREQ 500
  61. #define NAPC_ALTDLACK 501
  62. #define NAPC_WHOIS 603
  63. #define NAPC_WHOISRESP 604
  64. #define NAPC_WHOWASRESP 605
  65. #define NAPC_UPLOADREQ 607
  66. #define NAPC_UPLOADACCEPT 608
  67. #define NAPC_LOCALQUEUEFULL 619
  68. #define NAPC_REMOTEQUEUEFULL 620
  69. #define NAPC_SYSMSG 621
  70. #define NAPC_GLOBALMSG 628
  71. #define NAPC_EMAILCHANGE 702
  72.  
  73. extern void nap_login_fromlist(char *server);
  74. extern void nap_login(void);
  75. extern void nap_logout(void);
  76. extern void nap_listen(void);
  77. extern void nap_send(u_int com);
  78. extern int nap_sendbuf(u_int com, char *buf);
  79. extern void nap_songfree(song s);
  80. extern song nap_songdup(song s);
  81.  
  82. extern char *nap_strippath(char *name);
  83. extern char *nap_token(char **str);
  84. extern int nap_itoken(char **str);
  85. extern u_long nap_ltoken(char **str);
  86.  
  87.  
  88.  
  89. #endif    /* AMSTER_NAPSTER_H */
  90.